<!DOCTYPE html>
<html lang="en" style="background: #fff">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>历史订单</title>
    <script src="__WECHAT__/js/jquery.min.js"></script>
    <script src="__WECHAT__/js/public.js"></script>
    <script src="__WECHAT__/vendors/layer/layer.js"></script>
    <link rel="stylesheet" href="__WECHAT__/css/style.css">
    <link rel="stylesheet" href="__TAOKE__/css/orderList.css">
</head>
<body>
<div class="page-wrap">
    <div class="page-container">
        <div class="main-layout">
            <ul class="list-card" style="display: block;">
                {volist name="list" id="vo"}
                <li class="item-card">
                    <div class="tpl-wrapper">
                        <div class="card-box">
                            <div class="order-num-box">
                                <div class="info">
                                    <span class="text">订单编号: {$vo.order_num}</span>
                                </div>
                            </div>
                            <div class="order-status">
                                <div class="order-status-box">
                                    <span class="order-status-text">{$vo.status_text}</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tpl-wrapper">
                        <div class="card-box">
                            <div class="order-item">
                                <div class="img-box">
                                    <div class="img" style="background-image: url({$vo.item.pic_url});"></div>
                                </div>
                                <div class="item-info-box">
                                    <div class="item-info-box-title">
                                        <span class="item-info-box-title-text">{$vo.item.title}</span>
                                    </div>
                                    <div class="item-info-box-sku">
                                        <span class="item-info-box-sku-text">{$vo.sku_name}</span>
                                    </div>
                                </div>
                                <div class="item-num-box">
                                    <div class="price">
                                        <span class="text">￥{$vo.money}</span>
                                    </div>
                                    <div class="num">
                                        <span class="text">X1</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tpl-wrapper">
                        <div class="order-pay">
                            <div class="info">
                                <div class="text-box">
                                    <span class="text">共1件商品 合计: {$vo.money}</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    {eq name="vo.status" value="0"}
                    <div class="tpl-wrapper">
                        <div class="pay-call-box">
                            <div class="line"></div>
                            <div class="button-box">
                                <div class="box">
                                    <div class="button">
                                        <span class="text callPay" data-order="{$vo.id}">立即支付</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    {/eq}
                </li>
                {/volist}
            </ul>
        </div>
    </div>
</div>

<script src="__TAOKE__/js/pay.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">

    var pay_url = '{:url('wechat/Order/callPay')}';
    var order_list_url = '{:url('wechat/User/order')}';
    var page = 1;


    $(function () {
        //getOrderList();
        $('.callPay').click(function () {
            var orderId = $(this).data('order');
            console.log(orderId)
            callPay(orderId);
        });
    });


</script>
</body>
</html>